var express = require('express')
var router = express.Router()

// 导入用户集合的字段的数据模型、导入生成token的模块
var goodsModel = require('../model/goods/GoodsModel')
var catesModel = require('../model/goods/CatesModel')
var orderModel = require('../model/goods/OrderModel')
var jwt = require('../utils/jwt')

router.get('/list', (req, res) => {
  jwt.verifyToken(req, res).then(() => {
    orderModel.find().then(order => {
      res.json({ err: 0, msg: 'success', order })
    })
  })
})
module.exports = router